class Prerequisite(db.Model):
    __tablename__ = "prerequisite"

    id = db.Column(db.Integer, primary_key=True, unique=True)
    pre_id = db.Column(db.Integer, db.ForeignKey('course.course_id'))
    course_id = db.Column(db.Integer, db.ForeignKey('course.course_id'))
    course = db.relationship('Course', foreign_keys=course_id)
    pre_course = db.relationship('Course', foreign_keys=pre_id)